package com.zero.qth.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.zero.qth.mapper.DriverWithdrawMapper;
import com.zero.qth.domain.DriverWithdraw;
import com.zero.qth.service.IDriverWithdrawService;

/**
 * 司机提现申请Service业务层处理
 * 
 * @author cai-xu-kun
 * @date 2025-09-17
 */
@Service
@RequiredArgsConstructor
public class DriverWithdrawServiceImpl extends ServiceImpl<DriverWithdrawMapper, DriverWithdraw> implements IDriverWithdrawService {

    private final DriverWithdrawMapper driverWithdrawMapper;

    /**
     * 查询司机提现申请分页
     *
     * @param driverWithdraw 司机提现申请
     * @param p 分页数据
     * @return 司机提现申请
     */
    @Override
    public Page<DriverWithdraw> selectDriverWithdrawListPage(DriverWithdraw driverWithdraw, Page<DriverWithdraw> p) {
        return driverWithdrawMapper.selectDriverWithdrawListPage(driverWithdraw, p);
    }

    /**
     * 查询司机提现申请
     * 
     * @param id 司机提现申请主键
     * @return 司机提现申请
     */
    @Override
    public DriverWithdraw selectDriverWithdrawById(Long id) {
        return driverWithdrawMapper.selectDriverWithdrawById(id);
    }

    /**
     * 查询司机提现申请列表
     * 
     * @param driverWithdraw 司机提现申请
     * @return 司机提现申请
     */
    @Override
    public List<DriverWithdraw> selectDriverWithdrawList(DriverWithdraw driverWithdraw) {
        return driverWithdrawMapper.selectDriverWithdrawList(driverWithdraw);
    }

    /**
     * 新增司机提现申请
     * 
     * @param driverWithdraw 司机提现申请
     * @return 结果
     */
    @Override
    public int insertDriverWithdraw(DriverWithdraw driverWithdraw) {
        return driverWithdrawMapper.insertDriverWithdraw(driverWithdraw);
    }

    /**
     * 修改司机提现申请
     * 
     * @param driverWithdraw 司机提现申请
     * @return 结果
     */
    @Override
    public int updateDriverWithdraw(DriverWithdraw driverWithdraw) {
        return driverWithdrawMapper.updateDriverWithdraw(driverWithdraw);
    }

    /**
     * 批量删除司机提现申请
     * 
     * @param ids 需要删除的司机提现申请主键
     * @return 结果
     */
    @Override
    public int deleteDriverWithdrawByIds(Long[] ids) {
        return driverWithdrawMapper.deleteDriverWithdrawByIds(ids);
    }

    /**
     * 删除司机提现申请信息
     * 
     * @param id 司机提现申请主键
     * @return 结果
     */
    @Override
    public int deleteDriverWithdrawById(Long id) {
        return driverWithdrawMapper.deleteDriverWithdrawById(id);
    }
}
